package com.kuwei.utils;

import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

public class Utility {

	public static class Params{
		public static Map<String,Object> parseParams(HttpServletRequest request){
			Map<String,Object> map = new HashMap<String,Object>();
			Enumeration<String> e = request.getParameterNames() ;
			while(e.hasMoreElements()){
				String param = e.nextElement();
				map.put(param , request.getParameter(param));
			};
			return map;
		}
	}
	
	public static class StringUtil{
		public static boolean isEmpty(String s){
			if(s==null||"".equals(s.trim())||"null".equals(s.trim())){
				return true;
			}
			return false;
		}
		
	}
}
